<template>
	<view>
		<view class="Box bb" v-for="item in list" :key="item.id">
			<view class="u-flex u-row-between">
				<view style="font-weight: 400;color: rgba(51, 51, 51, 1);">
					车牌号：
				</view>
				<view class="licensePlateBox">
					{{item.car_plate}}
				</view>
			</view>
			<view class="u-flex u-row-between" style="height: 72rpx;">
				<view style="font-weight: 400;color: rgba(51, 51, 51, 1);">
					车型：
				</view>
				<view class="rightBox">
					{{item.car_model || '-'}}
				</view>
			</view>
			<view class="u-flex u-row-between" style="height: 72rpx;">
				<view style="font-weight: 400;color: rgba(51, 51, 51, 1);">
					牌照颜色：
				</view>
				<view class="rightBox">
					{{item.plate_color || '-'}}
				</view>
			</view>
			<view class="u-flex u-row-between" style="height: 72rpx;">
				<view style="font-weight: 400;color: rgba(51, 51, 51, 1);">
					预置皮重：
				</view>
				<view class="rightBox">
					{{item.default_tare_weight}}kg
				</view>
			</view>
			<view class="u-flex u-row-between" style="height: 72rpx;">
				<view style="font-weight: 400;color: rgba(51, 51, 51, 1);">
					产权归属：
				</view>
				<view class="rightBox">
					{{item.ownership_of_property || '-'}}
				</view>
			</view>
			<view class="u-flex u-row-between" style="height: 72rpx;">
				<view style="font-weight: 400;color: rgba(51, 51, 51, 1);">
					添加时间：
				</view>
				<view class="rightBox">
					{{item.created_at}}
				</view>
			</view>
			<view class="line"></view>
			<view class="u-flex u-row-between" style="margin-top: 32rpx;">
				<view style="color: rgba(51, 51, 51, 1);">皮重历史曲线：</view>
				<view style="color: rgba(51, 51, 51, 1);">></view>
			</view>
		</view>

		<navigator url="/pages/addCar/addCar" hover-class="none">
			<view class="addBox">
				<view class="u-flex u-row-center u-col-center"
					style="width: 100vw;height: 110rpx;background: rgba(255, 255, 255, 1);">
					<image src="../../static/添加@2x.png" style="width: 36rpx;height: 36rpx;"></image>
					<view style="color: rgba(51, 51, 51, 1);margin-left: 16rpx;">添加车辆</view>
				</view>
				<view style="width: 100vw;height: 42rpx;background: rgba(255, 255, 255, 1);"></view>
			</view>
		</navigator>
	</view>
</template>

<script>
	import { getVehicleList } from '../../common/api.config.js'
	export default {
		data() {
			return {
				list:[]
			}
		},
		onShow() {
			this.getCarList()
		},
		methods: {
			async getCarList(){
				var { data, code } = await getVehicleList()
				console.log(data);
				if(code == 1){
					this.list = data
				}
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: rgba(246, 246, 246, 1);
		padding-bottom: 180rpx;
	}

	.addBox {
		position: fixed;
		left: 0;
		bottom: 0;
		box-shadow: 0rpx -4rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
	}

	.rightBox {

		font-weight: 400;
		color: rgba(51, 51, 51, 1);
	}

	.licensePlateBox {
		width: 200rpx;
		height: 72rpx;
		background: rgba(253, 209, 0, 1);
		border-radius: 8rpx;
		text-align: center;
		line-height: 72rpx;
		border: 4rpx solid #000;
	}

	.Box {
		width: 686rpx;
		// height: 668rpx;
		opacity: 1;
		border-radius: 32rpx;
		background: rgba(255, 255, 255, 1);
		box-shadow: 0rpx 12rpx 12rpx 0rpx rgba(0, 0, 0, 0.06);
		margin: 32rpx 0 0 32rpx;
		padding: 32rpx;

		.line {
			width: 622rpx;
			height: 2rpx;
			background: rgba(232, 232, 232, 1);
			margin-top: 30rpx;
		}

		.type {
			font-size: 28rpx;
			font-weight: 400;
			color: rgba(51, 51, 51, 1);
		}
	}
</style>
